﻿using SqlSugar;
using System.ComponentModel.DataAnnotations.Schema;

namespace XinLife.Model
{
    /// <summary>
    /// 用户角色关系表
    /// </summary>
    [Table("tb_userrole")]
    [SugarTable("tb_userrole")]
    public class UserRole
    {
        public UserRole() { }

        public UserRole(string userId, string rid)
        {
            cId = Guid.NewGuid().ToString();
            cUserId = userId;
            cRoleId = rid;
            cCreatedDate = DateTime.Now;
        }

        /// <summary>
        /// 主键ID
        /// </summary>
        [SugarColumn(IsPrimaryKey = true)]
        public string cId { get; set; }
        /// <summary>
        /// 创建人
        /// </summary>
        public string cCreatedBy { get; set; }
        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime? cCreatedDate { get; set; }
        /// <summary>
        /// 用户
        /// </summary>
        public string cUserId { get; set; }
        /// <summary>
        /// 角色ID
        /// </summary>
        public string cRoleId { get; set; }


    }
}
